<template>
  <div id="app">
    <!--  匹配成功的router-link会添加一个router-link-exact-active的class名  -->
    <router-link to="/home" tag="button" replace>首页</router-link>
    <router-link to="/about" tag="button" replace>关于</router-link>

<!--  也可以手动修改这个class名  -->
<!--    <router-link to="/home" tag="button" replace active-class="active">首页</router-link>-->
<!--    <router-link to="/about" tag="button" replace active-class="active">关于</router-link>-->

<!--    <router-link to="home">首页</router-link>-->
<!--    <router-link to="about">关于</router-link>-->
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>

<style>
.router-link-exact-active {
  color: #42b983;
}
/*.active {*/
/*  color: #f00*/
/*}*/
</style>
